package com.ogawa.base.utils

import com.example.reslib.utils.PreferenceWrapper
import com.ogawa.base.Constant.Constant.DEVICE_802
import com.ogawa.base.Constant.Constants

object ProjectSPUtils {
     val sp:PreferenceWrapper by lazy {
          PreferenceWrapper()
     }
     fun getAppSp(): Int{
          return sp.getStringValue(Constants.SP_APP, ""+DEVICE_802).toInt()
     }
     fun setAppSp(value:String){
          return sp.setStringValueAndCommit(Constants.SP_APP, value)
     }
     fun getSaveVersion(): String{
          return sp.getStringValue(Constants.SAVE_VERSION, "")
     }
     fun setSaveVersion(value:String){
          sp.setStringValueAndCommit(Constants.SAVE_VERSION, value)
     }
     fun getSaveCount(): Int{
          return sp.getIntValue(Constants.SAVE_COUNT, 0)
     }
     fun setSaveCount(value:Int){
          sp.setIntValueAndCommit(Constants.SAVE_COUNT, value)
     }
     fun getIsFirst(): Boolean{
          return sp.getBooleanValue(Constants.IS_FIRST, true)
     }
     fun setIsFirst(value:Boolean){
          sp.setBooleanValueAndCommit(Constants.IS_FIRST, value)
     }

}